home *** CD-ROM | disk | FTP | other *** search
- Path: surfnet.nl!sun4nl!xs4all!noblehouse!Ronald
- Newsgroups: comp.sys.amiga.programmer
- From: Ronald@noblehouse.xs4all.nl (Ronald van Eijck)
- Subject: Re: 680X0 -> PPC translator?
- References: <4fstt2$old@newsstand.cit.cornell.edu> <PETERM.96Feb19135541@tui.maths.irl.cri.nz> <4glch6$rle@ra.nrl.navy.mil> <1190.6631T892T581@und.ida.liu.se>
- X-NewsSoftware: GRn 2.1 Feb 19, 1994
- MIME-Version: 1.0
- Content-Type: text/plain; charset=iso-8859-1
- Content-Transfer-Encoding: 8bit
- Message-ID: <Ronald.07ii@noblehouse.xs4all.nl>
- Date: Wed, 28 Feb 96 11:09:17 CET
- Organization: R&R Software
-
- In article <1190.6631T892T581@und.ida.liu.se> c92manen@und.ida.liu.se (Mans Engman) writes:
- >
- > fkrj@crux4.cit.cornell.edu (Benjamin Kenobi) writes:
- > >I'm just wondering, is there any good reason AT can't write a program
- > >which will tranlsate binary executables from 680X0 -> PPC, doing
- > >optimizations along the way? That way we could translate most of our old
- > >software and it would run efficiently. Why didn't Apple do this with the
- > >PowerMacs?
- >
- > It is not possible, in the general case, to do completely static code-
- > translation. This means that on some stage there always has to be some kind of
- > interpretation involved, no matter how complex you make the translator.
- > For instance, think about how to handle this simple question:
- > For a given program, what is code and what is data?
- > Ok, so you make a little code reachability test to find out...but then, how do
- > you make it handle indirect jumps (library calls!)? Hmm...just emulate the
- > code perhaps? :) How would you handle on-the-fly code creating/modifying? Ok,
- > so noone uses self-modifying code anymore, but what if some code is
- > compressed, for instance? You can't solve these problems without having rigid
- > rules which completely separate code from data. And that would break quite a
- > few programs.
-
- How about an interpreter with a special 'memory mode' This means that you
- can start an application under the interpreter which then remembers the
- translated version of the code it interpreted. If you run the program once
- this way and make sure you have the largest part of the program executed at
- least once, especially those parts that need the speed, the interpreter can
- write out a new binary with the translated parts replaced. A system that
- would do this automatically and incrementally everytime you run the application
- would translate more and more of the program to native code everytime you
- run it. Still an awful complex piece of code I think but very nice once
- you have it. Goodbye to self modifying code but that should have been outlawed
- a long time ago anyway.
-
- C'ya,
-
- --
- * Ronald van Eijck
- *
- * If you know the enemy and know yourself, you need not fear
- * the result of a hundred battles. (Sun Tzu)
-